<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
			<!-- template designed by Marco Von Ballmoos  -->
			<title>Docs For Class Image</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
						<script src="../../media/lib/classTree.js"></script>
												<script language="javascript" type="text/javascript">
				var imgPlus = new Image();
				var imgMinus = new Image();
				imgPlus.src = "../../media/images/plus.png";
				imgMinus.src = "../../media/images/minus.png";
				
				function showNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgMinus.src;
					oTable.style.display = "block";
				}
				
				function hideNode(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
							var oImg = document.layers["img" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
							var oImg = document.all["img" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
							var oImg = document.getElementById("img" + Node);
									break;
							}
					oImg.src = imgPlus.src;
					oTable.style.display = "none";
				}
				
				function nodeIsVisible(Node){
							switch(navigator.family){
								case 'nn4':
									// Nav 4.x code fork...
							var oTable = document.layers["span" + Node];
									break;
								case 'ie4':
									// IE 4/5 code fork...
							var oTable = document.all["span" + Node];
									break;
								case 'gecko':
									// Standards Compliant code fork...
							var oTable = document.getElementById("span" + Node);
									break;
							}
					return (oTable && oTable.style.display == "block");
				}
				
				function toggleNodeVisibility(Node){
					if (nodeIsVisible(Node)){
						hideNode(Node);
					}else{
						showNode(Node);
					}
				}
			</script>
					</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class Image</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
															<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">图像操作类库</p>
	<ul class="tags">
				<li><span class="field">author:</span> liu21st &lt;<a href="mailto:liu21st@gmail.com">liu21st@gmail.com</a>&gt;</li>
				<li><span class="field">version:</span> $Id$</li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_ORG---Util---Image.class.php.html">/ORG/Util/Image.class.php</a> (line <span class="field">24</span>)
		</p>
		
				
		<pre><a href="../../Think/Core/Base.html">Base</a>
   |
   --Image</pre>
	
			</div>
</div>




	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
												<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
										
				<div class="method-definition">
					static 						<span class="method-result">string</span>
										<a href="#buildImageVerify" title="details" class="method-name">buildImageVerify</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$length</span> = <span class="var-default">4</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$mode</span> = <span class="var-default">1</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">48</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">22</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$verifyName</span> = <span class="var-default">'verify'</span>])
									</div>
														
				<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#GBVerify" title="details" class="method-name">GBVerify</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$length</span> = <span class="var-default">4</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">180</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">50</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$fontface</span> = <span class="var-default">'simhei.ttf'</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$verifyName</span> = <span class="var-default">'verify'</span>])
									</div>
														
				<div class="method-definition">
					static 						<span class="method-result">mixed</span>
										<a href="#getImageInfo" title="details" class="method-name">getImageInfo</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$img</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$image</span>)
									</div>
														
				<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#output" title="details" class="method-name">output</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$im</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>])
									</div>
														
				<div class="method-definition">
					static 						<span class="method-result">string</span>
										<a href="#showAdvVerify" title="details" class="method-name">showAdvVerify</a>
											([<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">180</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">40</span>])
									</div>
														
				<div class="method-definition">
					static 						<span class="method-result">string</span>
										<a href="#showASCIIImg" title="details" class="method-name">showASCIIImg</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$image</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$string</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">''</span>])
									</div>
														
				<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#showImg" title="details" class="method-name">showImg</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$imgFile</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$text</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">80</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">30</span>])
									</div>
														
				<div class="method-definition">
					static 						<span class="method-result">void</span>
										<a href="#thumb" title="details" class="method-name">thumb</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$image</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$maxWidth</span> = <span class="var-default">200</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$maxHeight</span> = <span class="var-default">50</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$interlace</span> = <span class="var-default">true</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$suffix</span> = <span class="var-default">'_thumb'</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$position</span>)
									</div>
														
				<div class="method-definition">
					static 						<span class="method-result">string</span>
										<a href="#UPCA" title="details" class="method-name">UPCA</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$code</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$lw</span> = <span class="var-default">2</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$hi</span> = <span class="var-default">100</span>])
									</div>
																																																																																							</div>
		</div>
	</div>		

	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="methodbuildImageVerify" id="buildImageVerify"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static buildImageVerify</span> (line <span class="line-number">202</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">生成图像验证码</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">string</span>
		<span class="method-name">
			buildImageVerify
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$length</span> = <span class="var-default">4</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$mode</span> = <span class="var-default">1</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">48</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">22</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$verifyName</span> = <span class="var-default">'verify'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$length</span><span class="var-description">: 位数</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$mode</span><span class="var-description">: 类型</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: 图像格式</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$width</span><span class="var-description">: 宽度</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$height</span><span class="var-description">: 高度</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$verifyName</span>			</li>
				</ul>
		
			
	</div>
<a name="methodGBVerify" id="GBVerify"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static GBVerify</span> (line <span class="line-number">239</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		static <span class="method-result">void</span>
		<span class="method-name">
			GBVerify
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$length</span> = <span class="var-default">4</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">180</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">50</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$fontface</span> = <span class="var-default">'simhei.ttf'</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$verifyName</span> = <span class="var-default">'verify'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$length</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$type</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$width</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$height</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$fontface</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$verifyName</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetImageInfo" id="getImageInfo"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static getImageInfo</span> (line <span class="line-number">40</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">取得图像信息</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">mixed</span>
		<span class="method-name">
			getImageInfo
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$img</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$image</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$image</span><span class="var-description">: 图像文件名</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$img</span>			</li>
				</ul>
		
			
	</div>
<a name="methodoutput" id="output"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static output</span> (line <span class="line-number">430</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	
	<div class="method-signature">
		static <span class="method-result">void</span>
		<span class="method-name">
			output
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$im</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$im</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$type</span>			</li>
				</ul>
		
			
	</div>
<a name="methodshowAdvVerify" id="showAdvVerify"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static showAdvVerify</span> (line <span class="line-number">329</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">生成高级图像验证码</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">string</span>
		<span class="method-name">
			showAdvVerify
		</span>
					([<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">180</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">40</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: 图像格式</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$width</span><span class="var-description">: 宽度</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$height</span><span class="var-description">: 高度</span>			</li>
				</ul>
		
			
	</div>
<a name="methodshowASCIIImg" id="showASCIIImg"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static showASCIIImg</span> (line <span class="line-number">283</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">把图像转换成字符显示</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">string</span>
		<span class="method-name">
			showASCIIImg
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$image</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$string</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">''</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$image</span><span class="var-description">: 要显示的图像</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: 图像类型，默认自动获取</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$string</span>			</li>
				</ul>
		
			
	</div>
<a name="methodshowImg" id="showImg"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static showImg</span> (line <span class="line-number">74</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">显示服务器图像文件</p>
<p class="description"><p>支持URL方式</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">void</span>
		<span class="method-name">
			showImg
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$imgFile</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$text</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$width</span> = <span class="var-default">80</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$height</span> = <span class="var-default">30</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$imgFile</span><span class="var-description">: 图像文件名</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$text</span><span class="var-description">: 文字字符串</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$width</span><span class="var-description">: 图像宽度</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$height</span><span class="var-description">: 图像高度</span>			</li>
				</ul>
		
			
	</div>
<a name="methodthumb" id="thumb"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">static thumb</span> (line <span class="line-number">126</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">生成缩略图</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">void</span>
		<span class="method-name">
			thumb
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$image</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$filename</span> = <span class="var-default">''</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$maxWidth</span> = <span class="var-default">200</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$maxHeight</span> = <span class="var-default">50</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$interlace</span> = <span class="var-default">true</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$suffix</span> = <span class="var-default">'_thumb'</span>], <span class="var-type">string</span>&nbsp;<span class="var-name">$position</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$image</span><span class="var-description">: 原图</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: 图像格式</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$filename</span><span class="var-description">: 缩略图文件名</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$maxWidth</span><span class="var-description">: 宽度</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$maxHeight</span><span class="var-description">: 高度</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$position</span><span class="var-description">: 缩略图保存目录</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$interlace</span><span class="var-description">: 启用隔行扫描</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$suffix</span>			</li>
				</ul>
		
			
	</div>
<a name="methodUPCA" id="UPCA"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">static UPCA</span> (line <span class="line-number">377</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">生成UPC-A条形码</p>
	<ul class="tags">
				<li><span class="field">throws:</span> ThinkExecption</li>
			</ul>
	
	<div class="method-signature">
		static <span class="method-result">string</span>
		<span class="method-name">
			UPCA
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$code</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span> = <span class="var-default">'png'</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$lw</span> = <span class="var-default">2</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$hi</span> = <span class="var-default">100</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: 图像格式</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$lw</span><span class="var-description">: 单元宽度</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$hi</span><span class="var-description">: 条码高度</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$code</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Thu, 27 Mar 2008 08:20:45 +0000 by 塞北的雪
	</p>
	</div></body>
</html>